{extends file="./link.tpl"}
{block name="head"}
<script src="js/jquery.min.js" ></script>
<script src="js/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready (function(){
	if($('#isReceivedCheck').val() == 'Y')
	{
		$('.disabledMainInput').attr('disabled',true);
		$('.disabledMainInput').val('All Received');
	}
	else
  {
		$('.disabledMainInput').attr('disabled',false);
	}
});
function InstallmentAmount(obj)
{
	alert(obj.id);
	if(obj.checked == true)
	{
	  var ckval=obj.value;
	  var chid=obj.id;
	  $("#Receive"+chid).val(ckval);	
	}
	else
	{
		var chid=obj.id;
	  $("#Receive"+chid).val("");
	}
}
</script>
<style type="text/css">
	.loan
	{
     display:none;
  }
</style>
{/block}
{block name=body}
<form name="installmentForm" id="installmentForm" method="post">
	<input type="hidden" id="isReceivedCheck" value="{$isReceivedCheck}">
  <h1 align="center">Loan Draw Detail</h1>
  <table align="center" border="0">
    <tr>
      <td>Card No : </td>
      <td><input type="text" name="cardNo" autofocus="autofocus" required /></td>
      <td><input type="submit" name="submitBtn" value="Go" ></td>
    </tr>
  </table>
</form>
<form name="updateInstallment" method="post">
<input type="hidden" name="loanDrawId" value="{$loanDrawIdHidden}">
<table border="1" align="center">
  <tr>
    <th>Card No</th>
    <th>Party Name</th>
    <th>Installment Recieved</th>
    <th>Last Installment Date</th>
    <th>Installment Ammount</th>
    <th>Installment Reciev</th>
  </tr>
  <tr>
  	{if $loanDrawIdHidden != 0}
      <td align="center">{$drawArray.loanDrawId}</td>
      <td>{$drawArray.partyName}</td>
      <td align="center">{$drawArray.drawInstallmentReceived}</td>
      <td align="center">{$drawArray.lastInstallmentDate}</td>
      <td align="center">{$drawArray.installment}</td>
      <td><input type="text" name="installment" class="disabledMainInput" value="1"></td>
    {/if}
  </tr>
</table><br /><br />
<p align="center">
  <input type="submit" name="submit" value="Submit" >
</p>
<form>
{/block}